/**
 * Copyright (c) 2010 icer He <icerhe@gmail.com>
 */
package com.icerhe.trigger.task;

import android.content.Context;

public abstract class Task {
	/** Task子类在此方法里实现任务逻辑 */
	public abstract void runTask(Context context);
	
	public static final int ENABLED = 1;
	
	public static final int DISABLED = 0;
	
	/** 任务id */
	public int id = 0;
	
	public String type;

	/** 任务标题 */
	public String title;
	
	/** 任务描述 */
	public String description;
	
	/** 是否有效,0 无效 1 有效 */
	public int enabled;

	public long getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public int getEnabled() {
		return enabled;
	}
	
	public boolean isEnabled() {
		return enabled==ENABLED?true:false;
	}
	
	public void setEnabled(boolean enabled) {
		this.enabled = enabled?1:0;
	}

	public void setEnabled(int enabled) {
		this.enabled = enabled;
	}
	
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
}
